package com.crecheng.shop.Manage;

import com.crecheng.shop.DAO.ItemKindData;
import com.crecheng.shop.util.ConSQL;

import java.util.List;

public final class ItemKindManage {
    public static List<ItemKindData> getAll(){
        return ConSQL.select(ItemKindData.class);
    }

    public static ItemKindData get(int id){
        var res=get("id="+id);
        return res.size()>0? res.get(0) :null;
    }

    public static List<ItemKindData> get(String other){
        return ConSQL.select(ItemKindData.class,other);
    }

    public static List<ItemKindData> getByParent(int parent){
        return get("parent="+parent);
    }
}
